﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="{$cfg_site_description}" />

<title>帳戶餘額|{$cfg_site_name}</title>
{template 'header'}
<body>
<div id="buy917_wrap">
    <div id="buy917_header">
    	<div id="buy917_logo"><a href="index.php">Buy917</a></div>
        <div class="buy917_header_banner">
        	<div class="buy917_header_topbanner">
            	{template 'login_line'} <!-- login_line.html 登入/註冊按鈕 --> 
				<?php include("admin/event.php")?>
            </div>
          	<div class="buy917_header_select">
            	<div class="buy917_header_city">
                	 {if !empty($_cityid)}
                    <div class="guides">
                        <div class="city">
                            <h2>{$_cityname}</h2>
                        </div>
                        <div id="guides-city-change" class="change">切換城市</div>
                        <div id="guides-city-list" class="city-list">
                            <ul>
                            {loop $_citylist $v}
                                <li {if $v['cid']==$_cityid}class="current"{/if}><a href="index.php?cityid={$v['cid']}">{$v['cityname']}</a></li>
                            {/loop}
                            </ul>                   
                        </div>
                    </div>
                    {/if}	
                </div>
                <div class="buy917_header_group">
                	{template 'headergroup'}	
                </div>
            </div>
       </div>
    </div><!-- buy917_header -->
  
   {template 'menu_nav'} <!-- menu 導覽頁 --> 
       
    <div id="buy917_middle">
        	<div class="buy917_grouplist_top"></div>      
            <div class="buy917_grouplist_body"> 
                 <h2 class="abouth2">
					<ul>
						<li><a href="m.php?action=bond&type=available">我的團購券</a><span></span></li>
						<li><a href="m.php?action=orders&type=all">我的訂單</a><span></span></li>
						<li  class="current"><a href="m.php?action=account">帳戶餘額</a><span></span></li>
						<li><a href="m.php?action=settings">帳戶設置</a><span></span></li>
					</ul>
				</h2>
        		 <div class="box-content">
              <div class="head">
                <h3>您目前的帳戶餘額是$ <strong>{$_USERS['money']}</strong></h3>
              </div>
              <div class="sect">		
                <div class="notice">
                 {if empty($referrals_value)}     
                   <p>您還沒有邀請和消費記錄。</p>
                 {else}
                    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="coupons-table" id="order-list">
	      			<tbody>
	      				<tr>
	      					<th>被邀請人帳號</th>
							<th width="50%">團購項目</th>
							<th>返利金額</th>
							<th>發生時間</th>
							<th>狀態</th>
						</tr>
				{loop $referrals_value $r}
				{$r['gtitle']}
				   {if $r['gound_name'] != null}
					<tr {if $n%2==0} class="alt"{else}{/if}>
						<td style="text-align: left;">{$r['uname']}</td>
						<td><a target="_blank" href="view.php?gid={$r['gid']}" class="deal-title">{$r['gound_name']}</a></td>
						<td><span class="money">$</span>{$r['money']}.00</td><td>{php if($r['addtime']!=0)echo date("Y-m-d",$r['addtime'])}</td>
						<td class="op">
							{if $r['state']==0}審核中{elseif $r['state']==1} 成功{else}失敗{/if}
							
						</td>
					</tr>
					{/if}
				{/loop}
                    </tbody></table>
                  <ul class="paginator">
                  {echo pagelist($total,$pagesize,$page,$theurl."&type=$type");}
                </ul>  
                 {/if}
                  
                  
                </div>
              </div>
            </div>
			
            </div><!-- buy917_grouplist_body -->
            <div class="buy917_grouplist_bottom"></div>
    </div><!-- buy917_middle -->
</div><!-- buy917wrap -->
<!-- footer -->
<div id="buy917_footer">
	{template 'footer'}	
</div>
</body>
</html>
